#pragma once

#ifndef PLAYER_H_
#define PLAYER_H_

#include <list>
#include "PhysicalObject.h"

#include <SFML\Graphics\Shader.hpp>

using namespace std;
using namespace sf;

class Fire;

class Player : public PhysicalObject
{
public:
	Player(GameState *gameState);
	~Player();

	virtual void draw();

	virtual void firstUpdate();

	virtual void update(double dt);

	virtual void beginContact(b2Contact *contact);

	virtual void endContact(b2Contact *contact);

	virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold);

	void processContacts();

	void setInAura(bool val){ m_inAura = val; }

	void doKill();

	void setFire(Fire *fire) { m_fire = fire; }
	
	Fire* getFire() { return m_fire; }

private:
	int m_onFloor;

	bool m_previousOnFloor;

	bool m_jumpPressed;

	int m_jumpState;

	double m_onAirTimer;

	double m_shootingSpeed;

	double m_shootingCooldown;

	float m_shootingAngle;

	Shader *m_shader;	

	double m_time;

	double m_particleTimer;

	bool m_inAura;

	bool m_killed;

	double m_horizontalTimer;

	double m_horizontalMaxTimer;

	int m_direction;

	bool m_canStepDown;

	Fire *m_fire;

	float m_xAxisPosition;

	vector<b2Contact*> m_collisions;


};

#endif
